package hcn.protocol.brandnew.dengji.bingli;

import lombok.Data;
import javax.xml.bind.annotation.*;
import java.util.List;
import hcn.protocol.brandnew.BaseRequest;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import ctd.util.xml.jaxb.DateTimeAdapter;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;


/**
 * 病历质控信息提醒查询-响应消息(成功) - ODS_02100019_SUC
 *
 * @author enjoyLife
 */
@Data
@XmlRootElement(name = "Data")
@XmlAccessorType(XmlAccessType.FIELD)
public class GetMedicalRecordRemindResponse {

    /**
     * 质控提醒信息
     */
    @XmlElement(name = "RequestList")
    private RequestList requestList;

    @Data
    @XmlAccessorType(XmlAccessType.FIELD)
    public static class QualityRemindDetaillist {

        /**
         * 已补数量
         */
        @XmlElement(name = "ReplenishedQuantity")
        private Long replenishedQuantity;
        /**
         * 应写数量
         */
        @XmlElement(name = "ShouldQuantity")
        private Long shouldQuantity;
        /**
         * 应补数量
         */
        @XmlElement(name = "SupplementedQuantity")
        private Long supplementedQuantity;
        /**
         * 开始时间
         */
        @XmlElement(name = "StartTime")
        @XmlJavaTypeAdapter(DateTimeAdapter.class)
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
        private Date startTime;
        /**
         * 截止时间
         */
        @XmlElement(name = "EndTime")
        @XmlJavaTypeAdapter(DateTimeAdapter.class)
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
        private Date endTime;
        /**
         * 是否创建
         */
        @XmlElement(name = "IsSetup")
        private Long isSetup;
        /**
         * 病历名称
         */
        @XmlElement(name = "MedicalRecordName")
        private String medicalRecordName;
        /**
         * 病历编号
         */
        @XmlElement(name = "MedicalRecordId")
        private String medicalRecordId;
        /**
         * 超过时限
         */
        @XmlElement(name = "TimeLimit")
        private Long timeLimit;
    }

    @Data
    @XmlAccessorType(XmlAccessType.FIELD)
    public static class QualityRemindlist {

        /**
         * 提醒类型
         */
        @XmlElement(name = "RemindType")
        private Long remindType;
        /**
         * 质控提醒明细列表
         */
        @XmlElementWrapper(name = "QualityRemindDetaillists")
        @XmlElement(name = "QualityRemindDetaillist")
        private List<QualityRemindDetaillist> qualityRemindDetaillists;
    }

    @Data
    @XmlAccessorType(XmlAccessType.FIELD)
    public static class RequestList {

        /**
         * 业务系统患者档案ID
         */
        @XmlElement(name = "SourcePatientId")
        private String sourcePatientId;
        /**
         * 住院号
         */
        @XmlElement(name = "HospizationId")
        private String hospizationId;
        /**
         * 就诊流水号
         */
        @XmlElement(name = "VisitId")
        private String visitId;
        /**
         * 质控提醒列表
         */
        @XmlElementWrapper(name = "QualityRemindlists")
        @XmlElement(name = "QualityRemindlist")
        private List<QualityRemindlist> qualityRemindlists;
    }

}
